package cl.uchile.sketchpad.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cl.uchile.sketchpad.persistance.dao.SubjectVersionDao;
import cl.uchile.sketchpad.persistance.model.SubjectVersion;

@Service
public class SubjectVersionServiceImpl implements SubjectVersionService {

	@Autowired
	private SubjectVersionDao subjectVersionDao;
	
	@Override
	@Transactional(readOnly = true)
	public List<SubjectVersion> getAll() {
		return subjectVersionDao.getAll();
	}

	@Override
	@Transactional(readOnly = true)
	public SubjectVersion findById(Integer id) {
		return subjectVersionDao.findById(id);
	}

	@Override
	public void persist(SubjectVersion subjectVersion) {
		this.subjectVersionDao.persist(subjectVersion);
	}

}
